package com.itheima.service.impl.kafka.listener;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * ClassName: MessageListener
 * Description:
 * Date: 2023/03/21 PM 10:20:59
 * <p>
 * project: springboot
 * package: com.itheima.service.impl.kafka.listener
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Component
public class MessageListener {

    @KafkaListener(topics = "itheima2022")
    public void onMessage(ConsumerRecord<String, String> record) {
        System.out.println("已完成短信发送业务(kafka), id: " + record.value());
    }
}
